<tr id="room_<%=room.id%>" class="html_block published">
  <td class="first"/>
  <td></td>
  <td class="name">
    <div class="dividers">
      <%=room.room_category%>
    </div>
  </td>
  <td class="name">
    <div class="dividers">
      <%=room.name%>
    </div>
  </td>
  <td>
    <div class="dividers"><%=room.tel%></div>
  </td>
  <td>
    <div class="dividers">
      <span id="room_<%=room.id%>_users">
        <%room.users.each do |user|%>
          <%=render :partial=>'rooms/room_user',:locals=>{:room=>room,:user=>user}%>
        <%end%>
      </span>

      <span id="add_user_by_<%=room.id%>" style='display:none'>
        <br/>
        <br/>
        <%levels=room.event.users.find(:all,:select=>'level',:group=>'level').collect{|user| user.level}%>
        <%remote_form_for :user,:url=>{:controller=>'rooms',:action=>'add_user',:id=>"#{room.id}"} do |f|%>
          <%=f.select :level,levels,{},{ "onchange" => remote_function(   
                    :with => "'level='+value+';event_id='+#{room.event.id}",
                    :update => "next_select_by_#{room.id}",
                    :url => { :action => :select_with_ajax } ) }%>
          <span id="next_select_by_<%=room.id%>"></span>
          <%=f.submit '添加'%> | <a href="#" onclick="Element.toggle('add_user_by_<%=room.id%>');return false">取消</a>
        <%end%>
      </span>
    </div>
  </td>
  <td class="block_status">
    <span class="buttons">
      <%= link_to_remote image_tag("blank.png",:title => "删除",:class=>"delete_item"), :url=>{:controller=>"rooms",:action=>"delete",:id=>"#{room.id}"},:class=>"style='float:right'"%>
      <a href="#" onclick="Element.toggle('add_user_by_<%=room.id%>');return false">添加人员</a>
    </span>
  </td>
</tr>